package com.ttxs.generator.config;

import com.ttxs.generator.output.Output;
import com.ttxs.generator.output.java.*;
import com.ttxs.generator.output.js.ApiPathIndex;
import com.ttxs.generator.output.js.MenuData;
import com.ttxs.generator.output.js.RouterIndex;
import com.ttxs.generator.output.other.ApplicationYml;
import com.ttxs.generator.output.other.ParentPomXml;
import com.ttxs.generator.output.other.PomXml;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

@Configuration
public class OutputConfig {

    @Bean
    public List<Output> outputList() {
        List<Output> outputs = new ArrayList<>();
        outputs.add(new ApiPathIndex());
        outputs.add(new MybatisPlusConfig());
        outputs.add(new SwaggerConfig());
        outputs.add(new ApplicationYml());
        outputs.add(new Application());
        outputs.add(new PomXml());
        outputs.add(new ParentPomXml());
        return outputs;
    }

    @Bean
    public List<Output> staticRouteOutputList() {
        List<Output> outputs = new ArrayList<>();
        outputs.add(new RouterIndex());
        outputs.add(new MenuData());
        outputs.add(new R());
//        outputs.add(new MvcConfig());
        return outputs;
    }
}
